package hypeerweb;

public class BroadcastContent extends BroadcastVisitor {
	
	protected static final String CONTENT_KEY = "BroadcastContentKey";
	protected static final String CONTENT_VALUE = "BroadcastContentValue";

	@Override
	protected void operation(Node node, Parameters parameters) {
		node.getContents().set((String)parameters.get(CONTENT_KEY), parameters.get(CONTENT_VALUE));
	}

	public static Parameters createInitialParameters(WebId startNodeId, String key, Object value)
	{
		Parameters parameters = BroadcastVisitor.createInitialParameters(startNodeId);

		parameters.set(CONTENT_KEY, key);
		parameters.set(CONTENT_VALUE, value);
		
		return parameters;
	}
}
